Integrand size = 24, antiderivative size = 134 \[ \int \frac {\cos ^4(c+d x)}{a+i a \tan (c+d x)} \, dx=\frac {5 x}{16 a}-\frac {i a}{32 d (a-i a \tan (c+d x))^2}-\frac {i}{8 d (a-i a \tan (c+d x))}+\frac {i a^2}{24 d (a+i a \tan (c+d x))^3}+\frac {3 i a}{32 d (a+i a \tan (c+d x))^2}+\frac {3 i}{16 d (a+i a \tan (c+d x))} \]
5/16*x/a-1/32*I*a/d/(a-I*a*tan(d*x+c))^2-1/8*I/d/(a-I*a*tan(d*x+c))+1/24*I *a^2/d/(a+I*a*tan(d*x+c))^3+3/32*I*a/d/(a+I*a*tan(d*x+c))^2+3/16*I/d/(a+I* a*tan(d*x+c))
Time = 0.21 (sec) , antiderivative size = 131, normalized size of antiderivative = 0.98 \[ \int \frac {\cos ^4(c+d x)}{a+i a \tan (c+d x)} \, dx=-\frac {\sec ^5(c+d x) (-80 \cos (c+d x)+15 \cos (3 (c+d x))+\cos (5 (c+d x))+120 i \arctan (\tan (c+d x)) (\cos (c+d x)+i \sin (c+d x))+40 i \sin (c+d x)+45 i \sin (3 (c+d x))+5 i \sin (5 (c+d x)))}{384 a d (-i+\tan (c+d x))^3 (i+\tan (c+d x))^2} \]
-1/384*(Sec[c + d*x]^5*(-80*Cos[c + d*x] + 15*Cos[3*(c + d*x)] + Cos[5*(c + d*x)] + (120*I)*ArcTan[Tan[c + d*x]]*(Cos[c + d*x] + I*Sin[c + d*x]) + ( 40*I)*Sin[c + d*x] + (45*I)*Sin[3*(c + d*x)] + (5*I)*Sin[5*(c + d*x)]))/(a *d*(-I + Tan[c + d*x])^3*(I + Tan[c + d*x])^2)
Time = 0.32 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.02, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3042, 3968, 54, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos ^4(c+d x)}{a+i a \tan (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sec (c+d x)^4 (a+i a \tan (c+d x))}dx\) |
\(\Big \downarrow \) 3968 |
\(\displaystyle -\frac {i a^5 \int \frac {1}{(a-i a \tan (c+d x))^3 (i \tan (c+d x) a+a)^4}d(i a \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 54 |
\(\displaystyle -\frac {i a^5 \int \left (\frac {1}{8 a^5 (a-i a \tan (c+d x))^2}+\frac {3}{16 a^5 (i \tan (c+d x) a+a)^2}+\frac {1}{16 a^4 (a-i a \tan (c+d x))^3}+\frac {3}{16 a^4 (i \tan (c+d x) a+a)^3}+\frac {1}{8 a^3 (i \tan (c+d x) a+a)^4}+\frac {5}{16 a^5 \left (\tan ^2(c+d x) a^2+a^2\right )}\right )d(i a \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {i a^5 \left (\frac {5 i \arctan (\tan (c+d x))}{16 a^6}+\frac {1}{8 a^5 (a-i a \tan (c+d x))}-\frac {3}{16 a^5 (a+i a \tan (c+d x))}+\frac {1}{32 a^4 (a-i a \tan (c+d x))^2}-\frac {3}{32 a^4 (a+i a \tan (c+d x))^2}-\frac {1}{24 a^3 (a+i a \tan (c+d x))^3}\right )}{d}\) |
((-I)*a^5*((((5*I)/16)*ArcTan[Tan[c + d*x]])/a^6 + 1/(32*a^4*(a - I*a*Tan[ c + d*x])^2) + 1/(8*a^5*(a - I*a*Tan[c + d*x])) - 1/(24*a^3*(a + I*a*Tan[c + d*x])^3) - 3/(32*a^4*(a + I*a*Tan[c + d*x])^2) - 3/(16*a^5*(a + I*a*Tan [c + d*x]))))/d
3.2.6.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[E xpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && ILtQ[m, 0] && IntegerQ[n] && !(IGtQ[n, 0] && LtQ[m + n + 2, 0])
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_ ), x_Symbol] :> Simp[1/(a^(m - 2)*b*f) Subst[Int[(a - x)^(m/2 - 1)*(a + x )^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]
Time = 1.59 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.72
method | result | size |
risch | \(\frac {5 x}{16 a}+\frac {i {\mathrm e}^{-6 i \left (d x +c \right )}}{192 a d}+\frac {i \cos \left (4 d x +4 c \right )}{32 a d}+\frac {3 \sin \left (4 d x +4 c \right )}{64 a d}+\frac {5 i \cos \left (2 d x +2 c \right )}{64 a d}+\frac {15 \sin \left (2 d x +2 c \right )}{64 a d}\) | \(96\) |
derivativedivides | \(\frac {-\frac {5 i \ln \left (\tan \left (d x +c \right )-i\right )}{32}-\frac {3 i}{32 \left (\tan \left (d x +c \right )-i\right )^{2}}-\frac {1}{24 \left (\tan \left (d x +c \right )-i\right )^{3}}+\frac {3}{16 \left (\tan \left (d x +c \right )-i\right )}+\frac {i}{32 \left (\tan \left (d x +c \right )+i\right )^{2}}+\frac {5 i \ln \left (\tan \left (d x +c \right )+i\right )}{32}+\frac {1}{8 \tan \left (d x +c \right )+8 i}}{d a}\) | \(102\) |
default | \(\frac {-\frac {5 i \ln \left (\tan \left (d x +c \right )-i\right )}{32}-\frac {3 i}{32 \left (\tan \left (d x +c \right )-i\right )^{2}}-\frac {1}{24 \left (\tan \left (d x +c \right )-i\right )^{3}}+\frac {3}{16 \left (\tan \left (d x +c \right )-i\right )}+\frac {i}{32 \left (\tan \left (d x +c \right )+i\right )^{2}}+\frac {5 i \ln \left (\tan \left (d x +c \right )+i\right )}{32}+\frac {1}{8 \tan \left (d x +c \right )+8 i}}{d a}\) | \(102\) |
5/16*x/a+1/192*I/a/d*exp(-6*I*(d*x+c))+1/32*I/a/d*cos(4*d*x+4*c)+3/64/a/d* sin(4*d*x+4*c)+5/64*I/a/d*cos(2*d*x+2*c)+15/64/a/d*sin(2*d*x+2*c)
Time = 0.24 (sec) , antiderivative size = 76, normalized size of antiderivative = 0.57 \[ \int \frac {\cos ^4(c+d x)}{a+i a \tan (c+d x)} \, dx=\frac {{\left (120 \, d x e^{\left (6 i \, d x + 6 i \, c\right )} - 3 i \, e^{\left (10 i \, d x + 10 i \, c\right )} - 30 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 60 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 15 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 2 i\right )} e^{\left (-6 i \, d x - 6 i \, c\right )}}{384 \, a d} \]
1/384*(120*d*x*e^(6*I*d*x + 6*I*c) - 3*I*e^(10*I*d*x + 10*I*c) - 30*I*e^(8 *I*d*x + 8*I*c) + 60*I*e^(4*I*d*x + 4*I*c) + 15*I*e^(2*I*d*x + 2*I*c) + 2* I)*e^(-6*I*d*x - 6*I*c)/(a*d)
Time = 0.22 (sec) , antiderivative size = 219, normalized size of antiderivative = 1.63 \[ \int \frac {\cos ^4(c+d x)}{a+i a \tan (c+d x)} \, dx=\begin {cases} \frac {\left (- 50331648 i a^{4} d^{4} e^{16 i c} e^{4 i d x} - 503316480 i a^{4} d^{4} e^{14 i c} e^{2 i d x} + 1006632960 i a^{4} d^{4} e^{10 i c} e^{- 2 i d x} + 251658240 i a^{4} d^{4} e^{8 i c} e^{- 4 i d x} + 33554432 i a^{4} d^{4} e^{6 i c} e^{- 6 i d x}\right ) e^{- 12 i c}}{6442450944 a^{5} d^{5}} & \text {for}\: a^{5} d^{5} e^{12 i c} \neq 0 \\x \left (\frac {\left (e^{10 i c} + 5 e^{8 i c} + 10 e^{6 i c} + 10 e^{4 i c} + 5 e^{2 i c} + 1\right ) e^{- 6 i c}}{32 a} - \frac {5}{16 a}\right ) & \text {otherwise} \end {cases} + \frac {5 x}{16 a} \]
Piecewise(((-50331648*I*a**4*d**4*exp(16*I*c)*exp(4*I*d*x) - 503316480*I*a **4*d**4*exp(14*I*c)*exp(2*I*d*x) + 1006632960*I*a**4*d**4*exp(10*I*c)*exp (-2*I*d*x) + 251658240*I*a**4*d**4*exp(8*I*c)*exp(-4*I*d*x) + 33554432*I*a **4*d**4*exp(6*I*c)*exp(-6*I*d*x))*exp(-12*I*c)/(6442450944*a**5*d**5), Ne (a**5*d**5*exp(12*I*c), 0)), (x*((exp(10*I*c) + 5*exp(8*I*c) + 10*exp(6*I* c) + 10*exp(4*I*c) + 5*exp(2*I*c) + 1)*exp(-6*I*c)/(32*a) - 5/(16*a)), Tru e)) + 5*x/(16*a)
Exception generated. \[ \int \frac {\cos ^4(c+d x)}{a+i a \tan (c+d x)} \, dx=\text {Exception raised: RuntimeError} \]
Time = 0.43 (sec) , antiderivative size = 116, normalized size of antiderivative = 0.87 \[ \int \frac {\cos ^4(c+d x)}{a+i a \tan (c+d x)} \, dx=-\frac {-\frac {30 i \, \log \left (\tan \left (d x + c\right ) + i\right )}{a} + \frac {30 i \, \log \left (\tan \left (d x + c\right ) - i\right )}{a} + \frac {3 \, {\left (-15 i \, \tan \left (d x + c\right )^{2} + 38 \, \tan \left (d x + c\right ) + 25 i\right )}}{a {\left (-i \, \tan \left (d x + c\right ) + 1\right )}^{2}} - \frac {55 i \, \tan \left (d x + c\right )^{3} + 201 \, \tan \left (d x + c\right )^{2} - 255 i \, \tan \left (d x + c\right ) - 117}{a {\left (\tan \left (d x + c\right ) - i\right )}^{3}}}{192 \, d} \]
-1/192*(-30*I*log(tan(d*x + c) + I)/a + 30*I*log(tan(d*x + c) - I)/a + 3*( -15*I*tan(d*x + c)^2 + 38*tan(d*x + c) + 25*I)/(a*(-I*tan(d*x + c) + 1)^2) - (55*I*tan(d*x + c)^3 + 201*tan(d*x + c)^2 - 255*I*tan(d*x + c) - 117)/( a*(tan(d*x + c) - I)^3))/d
Time = 4.99 (sec) , antiderivative size = 123, normalized size of antiderivative = 0.92 \[ \int \frac {\cos ^4(c+d x)}{a+i a \tan (c+d x)} \, dx=\frac {5\,x}{16\,a}+\frac {\frac {25\,\mathrm {tan}\left (c+d\,x\right )}{48\,a}+\frac {1{}\mathrm {i}}{6\,a}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^2\,25{}\mathrm {i}}{48\,a}+\frac {5\,{\mathrm {tan}\left (c+d\,x\right )}^3}{16\,a}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^4\,5{}\mathrm {i}}{16\,a}}{d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^5\,1{}\mathrm {i}+{\mathrm {tan}\left (c+d\,x\right )}^4+{\mathrm {tan}\left (c+d\,x\right )}^3\,2{}\mathrm {i}+2\,{\mathrm {tan}\left (c+d\,x\right )}^2+\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}+1\right )} \]